<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
		<link href="css/ydui.css" rel="stylesheet" type="text/css">
		<link href="css/index.css" rel="stylesheet" type="text/css">
		<style>
			.list li h3{background:#FFD76E;color:#A51208;}
			.list li{border:0}
		</style>
		<title>活动登记</title>
	</head>

	<body>
		<header class="m-navbar navbar-fixed">
			<div class="navbar-center" style="margin-left:5%">
				<img src="img/logo.png" style="min-width:150px">
			</div>
			<a href="#" class="navbar-item" style="position: absolute;right:10px">
				<img src="img/icon_layout_top_grzx.png" style="height:0.4rem;margin-right:5px">
				<span class="name">请登录</span>
			</a>
		</header>
		<div class="g-view list">
			<!--<li>
				<h3>活动登记情况</h3>
				<p><span class="cx" code="01">统计查询</span><span class="yyzdj dj">奖品领取登记</span></p>
			</li>-->

		</div>
		<script src="http://g.alicdn.com/dingding/open-develop/1.9.0/dingtalk.js"></script>
		<script src="js/jquery-1.11.1.js"></script>
		<script src="js/ydui.flexible.js"></script>
		<script src="js/ydui.js"></script>
		<script>
			$(function() {
				$.post("selectActivity", function(data) {
					if(data.data.length > 0) {
						var rel=data.data
						var html = '';
						for(var i in rel) {
							html += '<li><h3>' + rel[i].活动名称 + '</h3>';
							html += '<h4><span class="cx" code="' + rel[i].活动代码 + '" style="width:100%">查询</span></h4></li>';
						}
						html+= '<li><h3>活动统计分析</h3><h4><span class="tjfx" style="width:100%">查看</span></h4></li>'
						$(".g-view").html(html)
						$(".g-view .cx").click(function() {
							var code = $(this).attr("code")
							var name = $(this).parent("p").siblings("h3").text()
							sessionStorage.setItem("name", name)
							sessionStorage.setItem("code", code)
							window.location.href = "httj"
						})
						$(".tjfx").click(function() {
							window.location.href = "httjfx"
						})
						
					}
				})
				$.post("selectUserByDdid", function(data) {
					/*	alert(JSON.stringify(data))*/
					if(data.code==0){
						var name = data.data.name;
						$(".name").text(name)
					}
				})
			})
		</script>
	</body>

</html>